<template>
	<view>
		<view class="box-yue1">
			<uni-collapse ref="collapse">
				<uni-collapse-item open="true" :title="`订单编号：${item.order_sn}`" v-for="item in list">
					<view class="content">
						<view class="title">
							<view class="text">订单金额：{{item.order_amount}}元</view>
							<view class="text">时间：{{item.createtime}}</view>
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>
		</view>
	</view>
</template>

<script setup>
	import {
		user,
		getShopOrderList
	} from '@/api/index.js';
	import {
		utils
	} from '@/utils/utils.js';
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app';
	import {
		ref
	} from 'vue';
	const list = ref([])
	onLoad((e) => {
		console.log(e)
		getList(e.id);
	});
	const getList = async (id) => {
		const ret = await getShopOrderList(id);
		if (ret.code == 1) {
			console.log(ret.data)
			list.value = ret.data.data.data
			// this.drawCharts('bwrAvTqHshAAtpvzHkmFEyMKhBgYhhqh', ret.data);
		} else {
			utils();
		}
	};
</script>

<style lang="scss" scoped>
		.box-yue1 {
			box-sizing: border-box;
			.title{
				display: flex;
				width: 100%;
				justify-content: space-between;
				padding: 10rpx 20rpx 20rpx 20rpx;
					box-sizing: border-box;
				}
			}
</style>